<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/* x509crl.js (c) 2012-2022 Kenji Urushima | kjur.github.io/jsrsasign/license
<span class='line'>  2</span>  */</span><span class="WHIT">
<span class='line'>  3</span> </span><span class="COMM">/*
<span class='line'>  4</span>  * x509crl.js - X509CRL class to parse X.509 CRL
<span class='line'>  5</span>  *
<span class='line'>  6</span>  * Copyright (c) 2010-2022 Kenji Urushima (kenji.urushima@gmail.com)
<span class='line'>  7</span>  *
<span class='line'>  8</span>  * This software is licensed under the terms of the MIT License.
<span class='line'>  9</span>  * https://kjur.github.io/jsrsasign/license
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * The above copyright and license notice shall be
<span class='line'> 12</span>  * included in all copies or substantial portions of the Software.
<span class='line'> 13</span>  */</span><span class="WHIT">
<span class='line'> 14</span> 
<span class='line'> 15</span> </span><span class="COMM">/**
<span class='line'> 16</span>  * @fileOverview
<span class='line'> 17</span>  * @name x509crl.js
<span class='line'> 18</span>  * @author Kenji Urushima kenji.urushima@gmail.com
<span class='line'> 19</span>  * @version jsrsasign 10.5.16 x509crl 1.0.5 (2022-Apr-08)
<span class='line'> 20</span>  * @since jsrsasign 10.1.0
<span class='line'> 21</span>  * @license &lt;a href="https://kjur.github.io/jsrsasign/license/">MIT License&lt;/a>
<span class='line'> 22</span>  */</span><span class="WHIT">
<span class='line'> 23</span> 
<span class='line'> 24</span> </span><span class="COMM">/**
<span class='line'> 25</span>  * hexadecimal X.509 CRL ASN.1 parser class.&lt;br/>
<span class='line'> 26</span>  * @class hexadecimal X.509 CRL ASN.1 parser class
<span class='line'> 27</span>  * @param {String} params X.509 CRL PEM string or hexadecimal string
<span class='line'> 28</span>  * @property {String} hex hexadecimal string of X.509 CRL ASN.1 data
<span class='line'> 29</span>  * @property {Integer} posSigAlg index of SignatureAlgorithm field in TBSCertList position depends on CRL version field
<span class='line'> 30</span>  * @property {Integer} posRevCert index of revokedCertificates field in TBSCertList depends on CRL version and nextUpdate field
<span class='line'> 31</span>  * @author Kenji Urushima
<span class='line'> 32</span>  * @version 1.0.0 (2020-Aug-26)
<span class='line'> 33</span>  * @see X509
<span class='line'> 34</span>  * @see &lt;a href="https://kjur.github.io/jsrsasigns/">jsrsasign home page https://kjur.github.io/jsrsasign/&lt;/a>
<span class='line'> 35</span>  *
<span class='line'> 36</span>  * @description
<span class='line'> 37</span>  * This class parses X.509 CRL. Following methods are provided to
<span class='line'> 38</span>  * get field value:&lt;br/>
<span class='line'> 39</span>  * &lt;b>BASIC FIELD&lt;/b>&lt;br/>
<span class='line'> 40</span>  * &lt;ul>
<span class='line'> 41</span>  * &lt;li>version - {@link X509CRL#getVersion}&lt;/li>
<span class='line'> 42</span>  * &lt;li>signatureAlgorithm - {@link X509CRL#getSignatureAlgorithmField}&lt;/li>
<span class='line'> 43</span>  * &lt;li>issuer - {@link X509CRL#getIssuer}&lt;/li>
<span class='line'> 44</span>  * &lt;li>issuer - {@link X509CRL#getIssuerHex}&lt;/li>
<span class='line'> 45</span>  * &lt;li>thisUpdate - {@link X509CRL#getThisUpdate}&lt;/li>
<span class='line'> 46</span>  * &lt;li>nextUpdate - {@link X509CRL#getNextUpdate}&lt;/li>
<span class='line'> 47</span>  * &lt;li>revokedCertificates - {@link X509CRL#getRevCertArray}&lt;/li>
<span class='line'> 48</span>  * &lt;li>revokedCertificate - {@link X509CRL#getRevCert}&lt;/li>
<span class='line'> 49</span>  * &lt;li>signature - {@link X509CRL#getSignatureValueHex}&lt;/li>
<span class='line'> 50</span>  * &lt;/ul>
<span class='line'> 51</span>  * &lt;b>UTILITIES&lt;/b>&lt;br/>
<span class='line'> 52</span>  * &lt;ul>
<span class='line'> 53</span>  * &lt;li>{@link X509CRL#getParam} - get all parameters&lt;/li>
<span class='line'> 54</span>  * &lt;/ul>
<span class='line'> 55</span>  *
<span class='line'> 56</span>  * @example
<span class='line'> 57</span>  * // constructor
<span class='line'> 58</span>  * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'> 59</span>  * crl = new X509CRL("3082...");
<span class='line'> 60</span>  */</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">X509CRL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">_KJUR</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">KJUR</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">	</span><span class="NAME">_isHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_KJUR.lang.String.isHex</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">	</span><span class="NAME">_ASN1HEX</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">ASN1HEX</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">	</span><span class="NAME">_getV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getV</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">	</span><span class="NAME">_getTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLV</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">	</span><span class="NAME">_getVbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getVbyList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">	</span><span class="NAME">_getTLVbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLVbyList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">	</span><span class="NAME">_getTLVbyListEx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getTLVbyListEx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="NAME">_getIdxbyList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getIdxbyList</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">	</span><span class="NAME">_getIdxbyListEx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getIdxbyListEx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="NAME">_getChildIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_ASN1HEX.getChildIdx</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">	</span><span class="NAME">_x509obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">    
<span class='line'> 75</span>     </span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">    </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">    </span><span class="NAME">this.posRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">    </span><span class="NAME">this.parsed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 79</span> 
<span class='line'> 80</span> </span><span class="WHIT">    </span><span class="COMM">/*
<span class='line'> 81</span>      * set field position of SignatureAlgorithm and revokedCertificates&lt;br/>
<span class='line'> 82</span>      * @description
<span class='line'> 83</span>      * This method will set "posSigAlg" and "posRevCert" properties.
<span class='line'> 84</span>      */</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">    </span><span class="NAME">this._setPos</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">	</span><span class="COMM">// for sigAlg</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.hex.substr</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"02"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	    </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">	    </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed 1st item of TBSCertList: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 96</span> 
<span class='line'> 97</span> </span><span class="WHIT">	</span><span class="COMM">// for revCerts</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.hex.substr</span><span class="PUNC">(</span><span class="NAME">idx2</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"17"</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">tag2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"18"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">tag3</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">	    </span><span class="NAME">idx3</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>103</span> </span><span class="WHIT">	    </span><span class="NAME">this.posRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>104</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idx3</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>105</span> </span><span class="WHIT">		</span><span class="NAME">tag3</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.hex.substr</span><span class="PUNC">(</span><span class="NAME">idx3</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag3</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">		    </span><span class="NAME">this.posRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">4</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// found revCert</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">	    </span><span class="NAME">this.posRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"a0"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// no nextUpdate and revCert</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">	    </span><span class="NAME">this.posRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT">	    </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"malformed nextUpdate or revCert tag: "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">tag2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>118</span> 
<span class='line'>119</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>120</span>      * get X.509 CRL format version&lt;br/>
<span class='line'>121</span>      * @name getVersion
<span class='line'>122</span>      * @memberOf X509CRL#
<span class='line'>123</span>      * @function
<span class='line'>124</span>      * @return {Number} version field value (generally 2) or null
<span class='line'>125</span>      * @description
<span class='line'>126</span>      * This method returns a version field value TBSCertList.
<span class='line'>127</span>      * This returns null if there is no such field.
<span class='line'>128</span>      * @example
<span class='line'>129</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>130</span>      * crl.getVersion() &rarr; 2
<span class='line'>131</span>      */</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">    </span><span class="NAME">this.getVersion</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">parseInt</span><span class="PUNC">(</span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"02"</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">16</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>136</span> 
<span class='line'>137</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>138</span>      * get signature algorithm name in basic field
<span class='line'>139</span>      * @name getSignatureAlgorithmField
<span class='line'>140</span>      * @memberOf X509CRL#
<span class='line'>141</span>      * @function
<span class='line'>142</span>      * @return {String} signature algorithm name (ex. SHA1withRSA, SHA256withECDSA, SHA512withRSAandMGF1)
<span class='line'>143</span>      * @see X509#getSignatureAlgorithmField
<span class='line'>144</span>      * @see KJUR.asn1.x509.AlgirithmIdentifier
<span class='line'>145</span>      * 
<span class='line'>146</span>      * @description
<span class='line'>147</span>      * This method will get a name of signature algorithm in CRL.
<span class='line'>148</span>      *
<span class='line'>149</span>      * @example
<span class='line'>150</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>151</span>      * crl.getSignatureAlgorithmField() &rarr; "SHA256withRSAandMGF1"
<span class='line'>152</span>      */</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">    </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTLV</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_x509obj.getAlgorithmIdentifierName</span><span class="PUNC">(</span><span class="NAME">hTLV</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span> 
<span class='line'>158</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>159</span>      * get JSON object of issuer field&lt;br/>
<span class='line'>160</span>      * @name getIssuer
<span class='line'>161</span>      * @memberOf X509CRL#
<span class='line'>162</span>      * @function
<span class='line'>163</span>      * @return {Array} JSON object of issuer field
<span class='line'>164</span>      * @see X509#getIssuer
<span class='line'>165</span>      * @see X509#getX500Name
<span class='line'>166</span>      * @see KJUR.asn1.x509.X500Name
<span class='line'>167</span>      *
<span class='line'>168</span>      * @description
<span class='line'>169</span>      * This method returns parsed issuer field value as
<span class='line'>170</span>      * JSON object.
<span class='line'>171</span>      *
<span class='line'>172</span>      * @example
<span class='line'>173</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>174</span>      * x.getIssuer() &rarr;
<span class='line'>175</span>      * { array: [[{type:'C',value:'JP',ds:'prn'}],...],
<span class='line'>176</span>      *   str: "/C=JP/..." }
<span class='line'>177</span>      */</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">    </span><span class="NAME">this.getIssuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_x509obj.getX500Name</span><span class="PUNC">(</span><span class="NAME">this.getIssuerHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>181</span> 
<span class='line'>182</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>183</span>      * get hexadecimal string of issuer field TLV of certificate.&lt;br/>
<span class='line'>184</span>      * @name getIssuerHex
<span class='line'>185</span>      * @memberOf X509CRL#
<span class='line'>186</span>      * @function
<span class='line'>187</span>      * @return {string} hexadecial string of issuer DN ASN.1
<span class='line'>188</span>      * @see X509CRL#getIssuer
<span class='line'>189</span>      * @since jsrsasign 10.5.5 x509crl 1.0.3
<span class='line'>190</span>      *
<span class='line'>191</span>      * @description
<span class='line'>192</span>      * This method returns ASN.1 DER hexadecimal string of
<span class='line'>193</span>      * issuer field.
<span class='line'>194</span>      *
<span class='line'>195</span>      * @example
<span class='line'>196</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>197</span>      * x.getIssuerHex() &rarr; "30..."
<span class='line'>198</span>      */</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">    </span><span class="NAME">this.getIssuerHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>202</span> 
<span class='line'>203</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>204</span>      * get JSON object of thisUpdate field&lt;br/>
<span class='line'>205</span>      * @name getThisUpdate
<span class='line'>206</span>      * @memberOf X509CRL#
<span class='line'>207</span>      * @function
<span class='line'>208</span>      * @return {String} string of thisUpdate field (ex. "YYMMDDHHmmSSZ")
<span class='line'>209</span>      * @see X509#getNotBefore
<span class='line'>210</span>      * @see X509CRL#getNextUpdate
<span class='line'>211</span>      * @see KJUR.asn1.x509.Time
<span class='line'>212</span>      *
<span class='line'>213</span>      * @description
<span class='line'>214</span>      * This method returns parsed thisUpdate field value as
<span class='line'>215</span>      * string.
<span class='line'>216</span>      *
<span class='line'>217</span>      * @example
<span class='line'>218</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>219</span>      * x.getThisUpdate() &rarr; "200825235959Z"
<span class='line'>220</span>      */</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">    </span><span class="NAME">this.getThisUpdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hThisUpdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>223</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">hThisUpdate</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>225</span> 
<span class='line'>226</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>227</span>      * get JSON object of nextUpdate field&lt;br/>
<span class='line'>228</span>      * @name getNextUpdate
<span class='line'>229</span>      * @memberOf X509CRL#
<span class='line'>230</span>      * @function
<span class='line'>231</span>      * @return {String} string of nextUpdate field or null
<span class='line'>232</span>      * @see X509#getNotBefore
<span class='line'>233</span>      * @see X509CRL#getThisUpdate
<span class='line'>234</span>      * @see KJUR.asn1.x509.Time
<span class='line'>235</span>      *
<span class='line'>236</span>      * @description
<span class='line'>237</span>      * This method returns parsed nextUpdate field value as
<span class='line'>238</span>      * string. "nextUpdate" is OPTIONAL field so 
<span class='line'>239</span>      * when nextUpdate field doesn't exists, this returns null.
<span class='line'>240</span>      *
<span class='line'>241</span>      * @example
<span class='line'>242</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>243</span>      * crl.getNextUpdate() &rarr; "200825235959Z"
<span class='line'>244</span>      */</span><span class="WHIT">
<span class='line'>245</span> </span><span class="WHIT">    </span><span class="NAME">this.getNextUpdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>246</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posSigAlg</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.hex.substr</span><span class="PUNC">(</span><span class="NAME">idx</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"17"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">tag</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"18"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">_getV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>251</span> 
<span class='line'>252</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>253</span>      * get array for revokedCertificates field&lt;br/>
<span class='line'>254</span>      * @name getRevCertArray
<span class='line'>255</span>      * @memberOf X509CRL#
<span class='line'>256</span>      * @function
<span class='line'>257</span>      * @return {Array} array of revokedCertificate parameter or null
<span class='line'>258</span>      * @see X509CRL#getRevCert
<span class='line'>259</span>      *
<span class='line'>260</span>      * @description
<span class='line'>261</span>      * This method returns parsed revokedCertificates field value as
<span class='line'>262</span>      * array of revokedCertificate parameter.
<span class='line'>263</span>      * If the field doesn't exists, it returns null.
<span class='line'>264</span>      *
<span class='line'>265</span>      * @example
<span class='line'>266</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>267</span>      * crl.getRevCertArray() &rarr;
<span class='line'>268</span>      * [{sn:"123a", date:"208025235959Z", ext: [{extname:"cRLReason",code:3}]},
<span class='line'>269</span>      *  {sn:"123b", date:"208026235959Z", ext: [{extname:"cRLReason",code:0}]}]
<span class='line'>270</span>      */</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">    </span><span class="NAME">this.getRevCertArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.posRevCert</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>273</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.posRevCert</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">idx</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">aIdx.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>277</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLV</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT">	    </span><span class="NAME">a.push</span><span class="PUNC">(</span><span class="NAME">this.getRevCert</span><span class="PUNC">(</span><span class="NAME">hRevCert</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>282</span> 
<span class='line'>283</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>284</span>      * get revokedCertificate JSON parameter&lt;br/>
<span class='line'>285</span>      * @name getRevCert
<span class='line'>286</span>      * @memberOf X509CRL#
<span class='line'>287</span>      * @function
<span class='line'>288</span>      * @return {Array} JSON object for revokedCertificate parameter
<span class='line'>289</span>      * @see X509CRL#getRevCertArray
<span class='line'>290</span>      *
<span class='line'>291</span>      * @description
<span class='line'>292</span>      * This method returns parsed revokedCertificate parameter
<span class='line'>293</span>      * as JSON object.
<span class='line'>294</span>      *
<span class='line'>295</span>      * @example
<span class='line'>296</span>      * crl = new X509CRL();
<span class='line'>297</span>      * crl.getRevCertArray("30...") &rarr;
<span class='line'>298</span>      * {sn:"123a", date:"208025235959Z", ext: [{extname:"cRLReason",code:3}]}
<span class='line'>299</span>      */</span><span class="WHIT">
<span class='line'>300</span> </span><span class="WHIT">    </span><span class="NAME">this.getRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hRevCert</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>301</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">param</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>302</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aIdx</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getChildIdx</span><span class="PUNC">(</span><span class="NAME">hRevCert</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>303</span> 
<span class='line'>304</span> </span><span class="WHIT">	</span><span class="NAME">param.sn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">hex</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hRevCert</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"02"</span><span class="PUNC">)</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>305</span> </span><span class="WHIT">	</span><span class="NAME">param.date</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">hextorstr</span><span class="PUNC">(</span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">hRevCert</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>306</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">aIdx.length</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">3</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT">	    </span><span class="NAME">param.ext</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> 
<span class='line'>308</span> 		</span><span class="NAME">_x509obj.getExtParamArray</span><span class="PUNC">(</span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">hRevCert</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>310</span> 
<span class='line'>311</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">param</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>313</span> 
<span class='line'>314</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>315</span>      * get revokedCertificate associative array for checking certificate&lt;br/>
<span class='line'>316</span>      * @name findRevCert
<span class='line'>317</span>      * @memberOf X509CRL#
<span class='line'>318</span>      * @function
<span class='line'>319</span>      * @param {string} PEM or hexadecimal string of certificate to be revocation-checked
<span class='line'>320</span>      * @return {object} JSON object for revokedCertificate or null
<span class='line'>321</span>      * @see X509CRL#getParam
<span class='line'>322</span>      * @see X509CRL#findRevCertBySN
<span class='line'>323</span>      * @since jsrsasign 10.5.5 x509crl 1.0.3
<span class='line'>324</span>      *
<span class='line'>325</span>      * @description
<span class='line'>326</span>      * This method will find revokedCertificate entry as JSON object
<span class='line'>327</span>      * for a specified certificate. &lt;br/>
<span class='line'>328</span>      * When the serial number is not found in the entry, this returns null.&lt;br/>
<span class='line'>329</span>      * Before finding, {@link X509CRL#getParam} is called internally
<span class='line'>330</span>      * to parse CRL.&lt;br/>
<span class='line'>331</span>      * NOTE: This method will just find an entry for a serial number.
<span class='line'>332</span>      * You need to check whether CRL is proper one or not
<span class='line'>333</span>      * for checking certificate such as signature validation or
<span class='line'>334</span>      * name checking.
<span class='line'>335</span>      *
<span class='line'>336</span>      * @example
<span class='line'>337</span>      * crl = new X509CRL(PEMCRL);
<span class='line'>338</span>      *
<span class='line'>339</span>      * crl.findRevCert(PEMCERT-REVOKED) &rarr; 
<span class='line'>340</span>      * {sn:"123a", date:"208025235959Z", ext: [{extname:"cRLReason",code:3}]}
<span class='line'>341</span>      *
<span class='line'>342</span>      * crl.findRevCert(PEMCERT-NOTREVOKED) &rarr; null
<span class='line'>343</span>      * 
<span class='line'>344</span>      * crl.findRevCert(CERT-HEX) &rarr; null or {sn:...}
<span class='line'>345</span>      */</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT">    </span><span class="NAME">this.findRevCert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sCert</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>347</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">x</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">X509</span><span class="PUNC">(</span><span class="NAME">sCert</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>348</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hSN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">x.getSerialNumberHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>349</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.findRevCertBySN</span><span class="PUNC">(</span><span class="NAME">hSN</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>350</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>351</span> </span><span class="WHIT">    
<span class='line'>352</span>     </span><span class="COMM">/**
<span class='line'>353</span>      * get revokedCertificate associative array for serial number&lt;br/>
<span class='line'>354</span>      * @name findRevCertBySN
<span class='line'>355</span>      * @memberOf X509CRL#
<span class='line'>356</span>      * @function
<span class='line'>357</span>      * @param {string} hexadecimal string of checking certificate serial number
<span class='line'>358</span>      * @return {object} JSON object for revokedCertificate or null
<span class='line'>359</span>      * @see X509CRL#getParam
<span class='line'>360</span>      * @see X509CRL#findRevCert
<span class='line'>361</span>      * @since jsrsasign 10.5.5 x509crl 1.0.3
<span class='line'>362</span>      *
<span class='line'>363</span>      * @description
<span class='line'>364</span>      * This method will find revokedCertificate entry as JSON object
<span class='line'>365</span>      * for a specified serial number. &lt;br/>
<span class='line'>366</span>      * When the serial number is not found in the entry, this returns null.&lt;br/>
<span class='line'>367</span>      * Before finding, {@link X509CRL#getParam} is called internally
<span class='line'>368</span>      * to parse CRL.&lt;br/>
<span class='line'>369</span>      * NOTE: This method will just find an entry for a serial number.
<span class='line'>370</span>      * You need to check whether CRL is proper one or not
<span class='line'>371</span>      * for checking certificate such as signature validation or
<span class='line'>372</span>      * name checking.
<span class='line'>373</span>      *
<span class='line'>374</span>      * @example
<span class='line'>375</span>      * crl = new X509CRL(PEMCRL);
<span class='line'>376</span>      * crl.findRevCertBySN("123a") &rarr; // revoked
<span class='line'>377</span>      * {sn:"123a", date:"208025235959Z", ext: [{extname:"cRLReason",code:3}]}
<span class='line'>378</span>      *
<span class='line'>379</span>      * crl.findRevCertBySN("0000") &rarr; null // not revoked
<span class='line'>380</span>      */</span><span class="WHIT">
<span class='line'>381</span> </span><span class="WHIT">    </span><span class="NAME">this.findRevCertBySN</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">hSN</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>382</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.parsed</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">this.getParam</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>383</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.parsed.revcert</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>384</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">revcert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.parsed.revcert</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>385</span> </span><span class="WHIT">	</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">revcert.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>386</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">hSN</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">revcert</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">sn.hex</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">revcert</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>387</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>388</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>389</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>390</span> 
<span class='line'>391</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>392</span>      * get signature value as hexadecimal string&lt;br/>
<span class='line'>393</span>      * @name getSignatureValueHex
<span class='line'>394</span>      * @memberOf X509CRL#
<span class='line'>395</span>      * @function
<span class='line'>396</span>      * @return {String} signature value hexadecimal string without BitString unused bits
<span class='line'>397</span>      *
<span class='line'>398</span>      * @description
<span class='line'>399</span>      * This method will get signature value of CRL.
<span class='line'>400</span>      *
<span class='line'>401</span>      * @example
<span class='line'>402</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>403</span>      * crl.getSignatureValueHex() &rarr "8a4c47913..."
<span class='line'>404</span>      */</span><span class="WHIT">
<span class='line'>405</span> </span><span class="WHIT">    </span><span class="NAME">this.getSignatureValueHex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>406</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">_getVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">2</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"03"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>407</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>408</span> 
<span class='line'>409</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>410</span>      * verifies signature value by public key&lt;br/>
<span class='line'>411</span>      * @name verifySignature
<span class='line'>412</span>      * @memberOf X509CRL#
<span class='line'>413</span>      * @function
<span class='line'>414</span>      * @param {Object} pubKey public key object, pubkey PEM or PEM issuer cert
<span class='line'>415</span>      * @return {Boolean} true if signature value is valid otherwise false
<span class='line'>416</span>      * @see X509#verifySignature
<span class='line'>417</span>      * @see KJUR.crypto.Signature
<span class='line'>418</span>      *
<span class='line'>419</span>      * @description
<span class='line'>420</span>      * This method verifies signature value of hexadecimal string of 
<span class='line'>421</span>      * X.509 CRL by specified public key.
<span class='line'>422</span>      * The signature algorithm used to verify will refer
<span class='line'>423</span>      * signatureAlgorithm field. 
<span class='line'>424</span>      * (See {@link X509CRL#getSignatureAlgorithmField})
<span class='line'>425</span>      *
<span class='line'>426</span>      * @example
<span class='line'>427</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>428</span>      * x.verifySignature(pubKey) &rarr; true, false or raising exception
<span class='line'>429</span>      */</span><span class="WHIT">
<span class='line'>430</span> </span><span class="WHIT">    </span><span class="NAME">this.verifySignature</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">pubKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>431</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">algName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>432</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hSigVal</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureValueHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>433</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hTbsCertList</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"30"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>434</span> </span><span class="WHIT">	
<span class='line'>435</span> 	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">KJUR.crypto.Signature</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">alg</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">algName</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>436</span> </span><span class="WHIT">	</span><span class="NAME">sig.init</span><span class="PUNC">(</span><span class="NAME">pubKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>437</span> </span><span class="WHIT">	</span><span class="NAME">sig.updateHex</span><span class="PUNC">(</span><span class="NAME">hTbsCertList</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>438</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">sig.verify</span><span class="PUNC">(</span><span class="NAME">hSigVal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>439</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>440</span> 
<span class='line'>441</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>442</span>      * get JSON object for CRL parameters&lt;br/>
<span class='line'>443</span>      * @name getParam
<span class='line'>444</span>      * @memberOf X509CRL#
<span class='line'>445</span>      * @function
<span class='line'>446</span>      * @return {Array} JSON object for CRL parameters
<span class='line'>447</span>      * @see KJUR.asn1.x509.CRL
<span class='line'>448</span>      *
<span class='line'>449</span>      * @description
<span class='line'>450</span>      * This method returns a JSON object of the CRL
<span class='line'>451</span>      * parameters. 
<span class='line'>452</span>      * Return value can be passed to
<span class='line'>453</span>      * {@link KJUR.asn1.x509.CRL} constructor.
<span class='line'>454</span>      * &lt;br/>
<span class='line'>455</span>      * NOTE1: From jsrsasign 10.5.16, optional argument can be applied.
<span class='line'>456</span>      * It can have following members:
<span class='line'>457</span>      * &lt;ul>
<span class='line'>458</span>      * &lt;li>tbshex - if this is true, tbshex member with hex value of
<span class='line'>459</span>      * tbsCertList will be added&lt;/li>
<span class='line'>460</span>      * &lt;li>nodnarray - if this is true, array member for subject and
<span class='line'>461</span>      * issuer will be deleted to simplify it&lt;li>
<span class='line'>462</span>      * &lt;/ul>
<span class='line'>463</span>      *
<span class='line'>464</span>      * @example
<span class='line'>465</span>      * crl = new X509CRL("-----BEGIN X509 CRL...");
<span class='line'>466</span>      * crl.getParam() &rarr;
<span class='line'>467</span>      * {version: 2,
<span class='line'>468</span>      *  sigalg: "SHA256withRSA",
<span class='line'>469</span>      *  issuer: {array:
<span class='line'>470</span>      *    [[{type:"C",value:"JP",ds:"prn"}],[{type:"O",value:"T1",ds:"prn"}]]},
<span class='line'>471</span>      *  thisupdate: "200820212434Z",
<span class='line'>472</span>      *  nextupdate: "200910212434Z",
<span class='line'>473</span>      *  revcert: [
<span class='line'>474</span>      *   {sn:{hex:"123d..."},
<span class='line'>475</span>      *    date:"061110000000Z",
<span class='line'>476</span>      *    ext:[{extname:"cRLReason",code:4}]}],
<span class='line'>477</span>      *  ext: [
<span class='line'>478</span>      *   {extname:"authorityKeyIdentifier",kid:{hex: "03de..."}},
<span class='line'>479</span>      *   {extname:"cRLNumber",num:{hex:"0211"}}],
<span class='line'>480</span>      *  sighex: "3c5e..."}
<span class='line'>481</span>      *
<span class='line'>482</span>      * crl.getParam({tbshex: true}) &rarr; { ... , tbshex: "30..." }
<span class='line'>483</span>      * crl.getParam({nodnarray: true}) &rarr; {issuer: {str: "/C=JP"}, ...}
<span class='line'>484</span>      */</span><span class="WHIT">
<span class='line'>485</span> </span><span class="WHIT">    </span><span class="NAME">this.getParam</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">option</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>486</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>487</span> 
<span class='line'>488</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getVersion</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>489</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">version</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>490</span> </span><span class="WHIT">	
<span class='line'>491</span> 	</span><span class="NAME">result.sigalg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureAlgorithmField</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>492</span> </span><span class="WHIT">	</span><span class="NAME">result.issuer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getIssuer</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>493</span> </span><span class="WHIT">	</span><span class="NAME">result.thisupdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getThisUpdate</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>494</span> 
<span class='line'>495</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">nextUpdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getNextUpdate</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>496</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">nextUpdate</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.nextupdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nextUpdate</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>497</span> 
<span class='line'>498</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">revCerts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getRevCertArray</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>499</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">revCerts</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">result.revcert</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">revCerts</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>500</span> 
<span class='line'>501</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">idxExt</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getIdxbyListEx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"[0]"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>502</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">idxExt</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>503</span> </span><span class="WHIT">	    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hExtSeq</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyListEx</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"[0]"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>504</span> </span><span class="WHIT">	    </span><span class="NAME">result.ext</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_x509obj.getExtParamArray</span><span class="PUNC">(</span><span class="NAME">hExtSeq</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>505</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>506</span> 
<span class='line'>507</span> </span><span class="WHIT">	</span><span class="NAME">result.sighex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getSignatureValueHex</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>508</span> 
<span class='line'>509</span> </span><span class="WHIT">	</span><span class="NAME">this.parsed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>510</span> 
<span class='line'>511</span> </span><span class="WHIT">	</span><span class="COMM">// for options</span><span class="WHIT">
<span class='line'>512</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">option</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>513</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">option.tbshex</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>514</span> </span><span class="WHIT">		</span><span class="NAME">result.tbshex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">_getTLVbyList</span><span class="PUNC">(</span><span class="NAME">this.hex</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>515</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>516</span> </span><span class="WHIT">	    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">option.nodnarray</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>517</span> </span><span class="WHIT">		</span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">result.issuer.array</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>518</span> </span><span class="WHIT">	    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>519</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>520</span> 
<span class='line'>521</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>522</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>523</span> 
<span class='line'>524</span> </span><span class="WHIT">    </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"string"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>525</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">_isHex</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>526</span> </span><span class="WHIT">	    </span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>527</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">params.match</span><span class="PUNC">(</span><span class="REGX">/-----BEGIN X509 CRL/</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>528</span> </span><span class="WHIT">	    </span><span class="NAME">this.hex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">pemtohex</span><span class="PUNC">(</span><span class="NAME">params</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>529</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>530</span> </span><span class="WHIT">	</span><span class="NAME">this._setPos</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>531</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>532</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>533</span> </span></pre></body></html>